package week6.day40.title32;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.Scanner;

/**
 * @Author fengzihao
 * @Date 2024-05-24 20:29
 */
public class CheckUsernameAndPassword {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        properties.load(new FileInputStream("UsernameAndPassword.properties"));
        Scanner sc = new Scanner(System.in);
        String username = sc.nextLine();
        String password = sc.nextLine();
        if (password!=null&&password.equals(properties.getProperty(username)))
            System.out.println("输入正确！");
        else
            System.out.println("输入错误！");
    }
}
